// Copyright 2022 jeff.li. and/or its affiliates.

#pragma once

#include <tbir/pipeline/op_kernel.h>

namespace tbir::runtime {

    class LibraryLoaderOp : public OpKernel {
    public:
        void Init() override;

        int Bundle(string_view folder) override;

        RTValue Process(PyArgs inputs) const override;

    private:
        void load_dl_paths(const List &dl_paths);

    private:
        List abi0_dl_paths_;
        List abi1_dl_paths_;
        std::vector<std::shared_ptr<void>> lib_holder_;
    };

}  // namespace tbir::runtime